package com.yisoo.common.to;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class CheckDeviceIsOpenTo {

    private CheckDeviceStatus status;
    private String uuid;
    private Long boxId;
    private Long bagId;

    public CheckDeviceIsOpenTo(CheckDeviceStatus checkDeviceStatus,String uuid){
        this.status = checkDeviceStatus;
        this.uuid = uuid;

    }


    public enum CheckDeviceStatus {
        DEVICE_NULL(10000,"设备不存在"),
        DEVICE_OFFLINE(10001,"设备不在线"),
        DEVICE_UNACTIVE(10002,"设备未激活"),
        DEVICE_STATUS_ERROR(10003,"存储箱状态异常"),
        DEVICE_ONLINE(11000,"设备在线"),
        DEVICE_OPENED(15001,"背包已经打开了"),
        DEVICE_NO_BAG(15002,"存储箱内无背包"),
        DEVICE_OK(21000,"设备可用"),
        DEVICE_BAG_STATUS_ERROR(15003,"背包状态异常");

        private int code;
        private String msg;
        CheckDeviceStatus(int code,String msg){
            this.code = code;
            this.msg = msg;
        }
        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }

}
